#include <ximera/gui/cegui/cegui.hpp>

#if defined(XIMERA_PRAGMA_COMMENT_LIB) && !defined(XIMERA_NO_AUTOLINK)

#if defined(XIMERA_DEBUG)
#pragma comment(lib, "CEGUIBase_d.lib")
#pragma comment(lib, "OgreGUIRenderer_d.lib")
#else
#pragma comment(lib, "CEGUIBase.lib")
#pragma comment(lib, "OgreGUIRenderer.lib")
#endif

#endif

namespace ximera { namespace gui { namespace cegui
{
    CEGUI::MouseButton ximeraToCEGui(input::MouseCode code)
    {
        switch (code.value)
        {
        case input::MouseCode::Left:
            return CEGUI::LeftButton;

        case input::MouseCode::Right:
            return CEGUI::RightButton;

        case input::MouseCode::Middle:
            return CEGUI::MiddleButton;

        default:
            return CEGUI::LeftButton;
        }
    }

    input::MouseCode ceguiToXimera(CEGUI::MouseButton code)
    {
        switch (code)
        {
        case CEGUI::LeftButton:
            return input::MouseCode::Left;

        case CEGUI::RightButton:
            return input::MouseCode::Right;

        case CEGUI::MiddleButton:
            return input::MouseCode::Middle;

        default:
            return input::MouseCode::Left;
        }
    }
}}}